//
//  CSWGroupBuyViewController.m
//  网易彩票
//
//  Created by MAC on 16/6/5.
//  Copyright © 2016年 MAC. All rights reserved.
//

#import "CSWGroupBuyViewController.h"

#import "CSWTitleButton.h"

@interface CSWGroupBuyViewController ()

@end

@implementation CSWGroupBuyViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
//    self.hidesBottomBarWhenPushed = YES;
    
    [self setNavBar];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)setNavBar{
    
    // 默认按钮的图片在左边
    CSWTitleButton *titleButton = [CSWTitleButton buttonWithType:UIButtonTypeCustom];
    // 文字
    [titleButton setTitle:@"全部采种" forState:UIControlStateNormal];
    
    // image
    [titleButton setImage:[UIImage imageNamed:@"YellowDownArrow"] forState:UIControlStateNormal];
    
    // 自动计算按钮尺寸
    [titleButton sizeToFit];
    
    self.navigationItem.titleView = titleButton;
}


@end
